<template>
	<Modal
	    v-model="modal" title="维修师详情">
	    <Form ref="formValidate" :label-width="100">
			 <Card dis-hover style="margin-top:5px;">
			     <div class="info-box">
			         <div class="serve-img-box info-item">
			             <span>
							<img :src="userInfo.userPhoto" alt="">
			 			</span>
			         </div>
			     </div>
				 <div class="info-box">
				     <div class="info-item">
				         <span>姓名：{{userInfo.realName}}</span>
				     </div>
				     <div class="info-item">
				         <span v-if="userInfo.age">年龄：{{userInfo.age}}岁</span>
				     </div>
				 </div>
			   <div class="info-box">
			      <div class="info-item">
			          <span>手机号：{{userInfo.userTel}}</span>
			      </div>
			      <div class="info-item">
			          <span>性别：{{genderString}}</span>
			      </div>
			  </div>
			    <div class="info-box">
			      <div class="info-item">
			          <span>地址：{{userInfo.address}}</span>
			      </div>
			      <!-- <div class="info-item">
			          <span>维修范围：
					  <p style="display: inherit;" v-for="(item,index) in userInfo.list">
							  {{item.scope}}
					  </p>
					</span>
			      </div> -->
			  </div>
			  <div class="info-box">
			      <div class="info-item">
			          <span>身高：{{userInfo.height}}米</span>
			      </div>
			      <div class="info-item">
			          <span>体重：{{userInfo.weight}}kg</span>
			      </div>
			  </div>
			 </Card>
	    </Form>
	    <div slot="footer">
	        <Button @click="cancel">返回</Button>
	    </div>
	</Modal>
</template>
<script>
export default {
    components:{
     
    },
    props:{
        type:String
    },
    data(){
        return {
            modal:false,
			userInfo:{},
			genderString:'',
			scopeString:''
        }
    },
    methods:{
        
        show(res){
            this.$nextTick(()=>{
				this.modal=true
                this.$http.post('/user/byId',{id: res.row.userId}).then(res=>{
                	if(res.status==200){
                		if(res.data.code==200){
                			this.userInfo=res.data.data
							let gender = res.data.data.gender
							if(gender==0){
								this.genderString = "保密"
							}else if(gender==1){
								this.genderString = "男"
							}else if(gender==2){
								this.genderString = "女"
							}
							
                		}
                		
                	}
                 
                })
            })
            
        },
        
        //取消
        cancel(){
				this.modal = false;
        }
    }
}
</script>
<style scoped>
.uploadSuccess{
    width: 200px;
    height: 100px;
}

.info-box{
    display: flex;
    margin-bottom: 10px;
	margin-top: 10px;
}
.info-item{
    flex: 1;
}
.serve-img-box img{
	text-align: center;
   width: 80px;
   height: 60px;
}
.serve-img-box{
	text-align: center;
}
</style>